package com.my.storage.config;

import com.my.storage.interceptor.LoginContextInterceptor;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;

/**
 * @author xhw
 */


//Spring MVC 配置类
//这里就是添加了拦截器
@Configuration
public class WebMvcConfig extends WebMvcConfigurationSupport {

    @Override
    protected void addInterceptors(final InterceptorRegistry registry) {
        registry.addInterceptor(new LoginContextInterceptor());
    }

}
